package org.jeecg.modules.manager.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.manager.entity.CarInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.manager.entity.CarInfoListVo;
import org.springframework.stereotype.Repository;

/**
 * @Description: 汽车信息表
 * @Author: jeecg-boot
 * @Date:   2021-11-19
 * @Version: V1.0
 */
@Repository
public interface CarInfoMapper extends BaseMapper<CarInfo> {
    @Select("select\n" +
            "bci.info_id,bci.parent_id,bci.info_color,bci.info_engine,bci.info_manufacturer,bci.info_version,bci.info_transmission,bci.info_price,bci.info_description\n" +
            "from\n" +
            "base_car bc\n" +
            "inner join base_car_info bci on bci.parent_id = bc.car_id\n" +
            "where bc.car_id = #{id} and bci.deleted = 'f'")
    List<CarInfoListVo> getCarInfoListVos(@Param("id") String id);
}
